#include<iostream>
#include<vector>
#include<map>
#include<algorithm>
using namespace std;
const int N = 210;
char s[N][N];
int n;
int main()
{
	cin >> n;
	int x, y, t;
	int cnt = 0;
	int idx = 0;
	int flag = 0;
	while (scanf("%d", &t) != EOF) {
		//cout<<"t=="<<t<<endl;
		for (int i = 0; i < t; i++) {
			y = cnt % n;
			if (cnt >= n) {
				cnt = 0;
				x++;
			}
			//cout<<"x=="<<x<<endl;
			//cout<<"y=="<<y<<endl;
			if (!flag) {
				s[x][y] = '0';
			}
			else s[x][y] = '1';
			cnt++;
		}
		flag = 1 - flag;
	}
	for (int i = 0; i < n; i++) {
		for (int j = 0; j < n; j++) {
			cout << s[i][j];
		}
		cout << endl;
	}
	return 0;
}